package com.alit.ibot.robot.wechat.service.impl;

import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.alit.ibot.robot.wechat.service.RobotWechatCommonService;
import com.alit.ibot.robot.wechat.service.RobotWechatTextService;

/**
 * 处理微发送的文本消息
 * 
 * @author litong
 * @date 2019年5月31日_下午8:21:41
 * @version 1.0
 * @desc
 */
@Service
public class RobotWechatTextServiceImpl implements RobotWechatTextService {
  @Autowired
  private RobotWechatCommonService rwcs;

  @Override
  public String getToWechatXML(Map<String, String> requestMap) {
    String question = requestMap.get("Content"); // 获取消息内容
    return rwcs.getRobotContentAndConvertToWechatXML(requestMap, question); // 处理robot返回的各种类型消息并处理成微信需要的格式
  }
}
